<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>2.v-if</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <button @click="n+=1">点我n+1</button>
      <h1>前端圈的第{{n}}个框架是：</h1>
      <h3 v-if="n === 1">Angular</h3>
      <h3 v-else-if="n === 2">React</h3>
      <h3 v-else-if="n === 3">Vue</h3>
      <h3 v-else>未知</h3>

    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          n:1,
        }
      })
    </script>
  </body>
</html>